package com.gisocn.onemap.greendao;

import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import com.gisocn.onemap.model.Files;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import org.greenrobot.greendao.internal.DaoConfig;

/* loaded from: classes.dex */
public class FilesDao extends AbstractDao<Files, Long> {
    public static final String TABLENAME = "FILES";

    /* loaded from: classes.dex */
    public static class Properties {
        public static final Property Id = new Property(0, Long.TYPE, "id", true, "_id");
        public static final Property CNUM = new Property(1, String.class, "CNUM", false, "CNUM");
        public static final Property CREATETIME = new Property(2, String.class, "CREATETIME", false, "CREATETIME");
        public static final Property DIRPATH = new Property(3, String.class, "DIRPATH", false, "DIRPATH");
        public static final Property EXTNAME = new Property(4, String.class, "EXTNAME", false, "EXTNAME");
        public static final Property FILENAME = new Property(5, String.class, "FILENAME", false, "FILENAME");
        public static final Property FILESIZE = new Property(6, String.class, "FILESIZE", false, "FILESIZE");
        public static final Property FILETYPE = new Property(7, String.class, "FILETYPE", false, "FILETYPE");
        public static final Property FILE_ID = new Property(8, String.class, "FILE_ID", false, "FILE__ID");
        public static final Property UPDATETIME = new Property(9, String.class, "UPDATETIME", false, "UPDATETIME");
        public static final Property ISEXIST = new Property(10, Boolean.TYPE, "ISEXIST", false, "ISEXIST");
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final boolean isEntityUpdateable() {
        return true;
    }

    public FilesDao(DaoConfig daoConfig) {
        super(daoConfig);
    }

    public FilesDao(DaoConfig daoConfig, DaoSession daoSession) {
        super(daoConfig, daoSession);
    }

    public static void createTable(Database database, boolean z) {
        String str = z ? "IF NOT EXISTS " : "";
        database.execSQL("CREATE TABLE " + str + "\"FILES\" (\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL ,\"CNUM\" TEXT,\"CREATETIME\" TEXT,\"DIRPATH\" TEXT,\"EXTNAME\" TEXT,\"FILENAME\" TEXT,\"FILESIZE\" TEXT,\"FILETYPE\" TEXT,\"FILE__ID\" TEXT,\"UPDATETIME\" TEXT,\"ISEXIST\" INTEGER NOT NULL );");
    }

    public static void dropTable(Database database, boolean z) {
        StringBuilder sb = new StringBuilder();
        sb.append("DROP TABLE ");
        sb.append(z ? "IF EXISTS " : "");
        sb.append("\"FILES\"");
        database.execSQL(sb.toString());
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final void bindValues(DatabaseStatement databaseStatement, Files files) {
        databaseStatement.clearBindings();
        databaseStatement.bindLong(1, files.getId());
        String cnum = files.getCNUM();
        if (cnum != null) {
            databaseStatement.bindString(2, cnum);
        }
        String createtime = files.getCREATETIME();
        if (createtime != null) {
            databaseStatement.bindString(3, createtime);
        }
        String dirpath = files.getDIRPATH();
        if (dirpath != null) {
            databaseStatement.bindString(4, dirpath);
        }
        String extname = files.getEXTNAME();
        if (extname != null) {
            databaseStatement.bindString(5, extname);
        }
        String filename = files.getFILENAME();
        if (filename != null) {
            databaseStatement.bindString(6, filename);
        }
        String filesize = files.getFILESIZE();
        if (filesize != null) {
            databaseStatement.bindString(7, filesize);
        }
        String filetype = files.getFILETYPE();
        if (filetype != null) {
            databaseStatement.bindString(8, filetype);
        }
        String file_id = files.getFILE_ID();
        if (file_id != null) {
            databaseStatement.bindString(9, file_id);
        }
        String updatetime = files.getUPDATETIME();
        if (updatetime != null) {
            databaseStatement.bindString(10, updatetime);
        }
        databaseStatement.bindLong(11, files.getISEXIST() ? 1L : 0L);
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final void bindValues(SQLiteStatement sQLiteStatement, Files files) {
        sQLiteStatement.clearBindings();
        sQLiteStatement.bindLong(1, files.getId());
        String cnum = files.getCNUM();
        if (cnum != null) {
            sQLiteStatement.bindString(2, cnum);
        }
        String createtime = files.getCREATETIME();
        if (createtime != null) {
            sQLiteStatement.bindString(3, createtime);
        }
        String dirpath = files.getDIRPATH();
        if (dirpath != null) {
            sQLiteStatement.bindString(4, dirpath);
        }
        String extname = files.getEXTNAME();
        if (extname != null) {
            sQLiteStatement.bindString(5, extname);
        }
        String filename = files.getFILENAME();
        if (filename != null) {
            sQLiteStatement.bindString(6, filename);
        }
        String filesize = files.getFILESIZE();
        if (filesize != null) {
            sQLiteStatement.bindString(7, filesize);
        }
        String filetype = files.getFILETYPE();
        if (filetype != null) {
            sQLiteStatement.bindString(8, filetype);
        }
        String file_id = files.getFILE_ID();
        if (file_id != null) {
            sQLiteStatement.bindString(9, file_id);
        }
        String updatetime = files.getUPDATETIME();
        if (updatetime != null) {
            sQLiteStatement.bindString(10, updatetime);
        }
        sQLiteStatement.bindLong(11, files.getISEXIST() ? 1L : 0L);
    }

    /* JADX WARN: Can't rename method to resolve collision */
    @Override // org.greenrobot.greendao.AbstractDao
    public Long readKey(Cursor cursor, int i) {
        return Long.valueOf(cursor.getLong(i + 0));
    }

    /* JADX WARN: Can't rename method to resolve collision */
    @Override // org.greenrobot.greendao.AbstractDao
    public Files readEntity(Cursor cursor, int i) {
        int i2 = i + 1;
        int i3 = i + 2;
        int i4 = i + 3;
        int i5 = i + 4;
        int i6 = i + 5;
        int i7 = i + 6;
        int i8 = i + 7;
        int i9 = i + 8;
        int i10 = i + 9;
        return new Files(cursor.getLong(i + 0), cursor.isNull(i2) ? null : cursor.getString(i2), cursor.isNull(i3) ? null : cursor.getString(i3), cursor.isNull(i4) ? null : cursor.getString(i4), cursor.isNull(i5) ? null : cursor.getString(i5), cursor.isNull(i6) ? null : cursor.getString(i6), cursor.isNull(i7) ? null : cursor.getString(i7), cursor.isNull(i8) ? null : cursor.getString(i8), cursor.isNull(i9) ? null : cursor.getString(i9), cursor.isNull(i10) ? null : cursor.getString(i10), cursor.getShort(i + 10) != 0);
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public void readEntity(Cursor cursor, Files files, int i) {
        files.setId(cursor.getLong(i + 0));
        int i2 = i + 1;
        files.setCNUM(cursor.isNull(i2) ? null : cursor.getString(i2));
        int i3 = i + 2;
        files.setCREATETIME(cursor.isNull(i3) ? null : cursor.getString(i3));
        int i4 = i + 3;
        files.setDIRPATH(cursor.isNull(i4) ? null : cursor.getString(i4));
        int i5 = i + 4;
        files.setEXTNAME(cursor.isNull(i5) ? null : cursor.getString(i5));
        int i6 = i + 5;
        files.setFILENAME(cursor.isNull(i6) ? null : cursor.getString(i6));
        int i7 = i + 6;
        files.setFILESIZE(cursor.isNull(i7) ? null : cursor.getString(i7));
        int i8 = i + 7;
        files.setFILETYPE(cursor.isNull(i8) ? null : cursor.getString(i8));
        int i9 = i + 8;
        files.setFILE_ID(cursor.isNull(i9) ? null : cursor.getString(i9));
        int i10 = i + 9;
        files.setUPDATETIME(cursor.isNull(i10) ? null : cursor.getString(i10));
        files.setISEXIST(cursor.getShort(i + 10) != 0);
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final Long updateKeyAfterInsert(Files files, long j) {
        files.setId(j);
        return Long.valueOf(j);
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public Long getKey(Files files) {
        if (files != null) {
            return Long.valueOf(files.getId());
        }
        return null;
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public boolean hasKey(Files files) {
        throw new UnsupportedOperationException("Unsupported for entities with a non-null key");
    }
}
